/**
 * Created with IntelliJ IDEA.
 * Description:java数据类型和变量，运算符练习
 * User: 11951
 * Date: 2025-03-06
 * Time: 19:16
 */
public class Demo {
    public static void main1(String[] args) {
        /*
        * 1.字面常量
        * */
        System.out.println("hello world");
        System.out.println(100);
        System.out.println(3.14);
        System.out.println('A');
        System.out.println(true);
        System.out.println(false);
    }
    /*
    * 2.变量
    * */
/*
* 整型变量
* */
    public static void main2(String[] args) {
        int a1 =10;
        int a2;
        a2=100;
        System.out.println(a2);
        System.out.println(Integer.MIN_VALUE);
        System.out.println(Integer.MAX_VALUE);
        System.out.println("==============");
        short b=10;
        System.out.println(b);
        System.out.println(Short.MAX_VALUE);
        System.out.println(Short.MIN_VALUE);
        Long c=1000L;
        System.out.println(c);
        System.out.println(Long.MIN_VALUE);
        System.out.println(Long.MAX_VALUE);

    }
/*
*字节型变量
* */
    public static void main3(String[] args) {
        byte a=10;
        System.out.println(Byte.MIN_VALUE);
        System.out.println(Byte.MAX_VALUE);
    }

    /*
    * 浮点型变量
    * */
    public static void main4(String[] args) {
        double a=3.14;
        System.out.println(a);
        double b=2.0;
        double c=3.0;
        System.out.println(a / b);
        float num=10.5f;
        System.out.println(num);
    }

    /*
    * 字符型变量
    * */
    public static void main5(String[] args) {
        char c1='A';
        char c2= '你';
        char c3 = '1';
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
    }

    /*
    * 布尔型变量
    * */
    public static void main6(String[] args) {
        boolean b = true;
        System.out.println(b);
        b=false;
        System.out.println(b);
    }

/*
* 字符串类型
* */
public static void main(String[] args) {
    String s1 = "hello";
    String  s2=" Java";
    System.out.println(s1);
    System.out.println(s2);
    System.out.println(s1 + s2);
}
}
